<html>
<head>
<title>PreCodeFormat Examples &amp; Tests</title>

<link href="precodeformat.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="precodeformat.js"></script>

</head>

<body onload="PreCodeFormat()">

<script>
document.write('<p><b>userAgent</b> : ');
document.write(navigator.userAgent);
document.write('<br/><b>appVersion</b> : ');
document.write(navigator.appVersion);
document.write('<br/><b>vendor</b> : ');
document.write(navigator.vendor);
document.write('</p>');
</script>

<h1>PreCodeFormat Examples</h1>

<p>
Pre block without class="code"
</p>
<pre>
int main(int argc, char **argv) {
	int x /* x = 0 */ = 0;
	// sample &lt;comment&gt;
	printf("sample output %d\n", x);
}
</pre>

<p>
Default keywords only
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x /* x = 0 */ = 0;
	// sample &lt;comment&gt;
	printf("sample output %d\n", x);
}
</pre>

<p>
Disabled and marked lines
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>int x /* x = 0 */ = 0;
	<disabled/>// sample &lt;comment&gt;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}

<mark type="arrow"/>int sub(int a) {
<mark type="cross"/>	// return a
<mark type="plus"/>	return a;
<mark type="star"/>}
</pre>

<p>
Adding custom function names
</p>
<pre class="code" functions="funct3 sum">
int funct3(int add) {
	return sum(add, 3);
}
</pre>

<p>
Adding custom variable names
</p>
<pre class="code" variables="add1 add2">
int funct4(int add1, int add2) {
	return sum(add1, add2;
}
</pre>

<p>
Adding extra custom keywords
</p>
<pre class="code" keywords="customkeyword">
int funct4(int add1, int add2) {
	return add1 customkeyword add2;
}
</pre>

<h1>PreCodeFormat Tests</h1>

<p>
Blank first line
</p>
<pre class="code">

second line
</pre>

<p>
Tab on first line
</p>
<pre class="code">
	
second line
</pre>

<p>
Multiple blank first lines
</p>
<pre class="code">


third line
</pre>

<p>
Blank line in middle
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x /* x = 0 */ = 0;

	printf("sample output %d\n", x);
}
</pre>

<p>
Multiple blank lines in middle
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x /* x = 0 */ = 0;


	printf("sample output %d\n", x);
}
</pre>

<p>
Blank line at end - <i>shows in FF/Chrome/Safari but doesn't show in IE7. Use tab or &amp;nbsp;
to force blank lines to appear at end</i>
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x = 0;
	printf("sample output %d\n", x);
}

</pre>

<p>
Tab on last line at end
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x = 0;
	printf("sample output %d\n", x);
}
	
</pre>

<p>
Multiple blank lines at end - <i>shows in FF/Chrome/Safari but doesn't show in IE7. Use tab or &amp;nbsp;
to force blank lines to appear at end</i>
</p>
<pre class="code">
int main(int argc, char **argv) {
	int x = 0;
	printf("sample output %d\n", x);
}


</pre>

<p>
Arrow & code on first line
</p>
<pre class="code">
<mark type="arrow"/>first line
next line
</pre>

<p>
Arrow on blank first line
</p>
<pre class="code">
<mark type="arrow"/>
next line
</pre>

<p>
Arrow on blank second line
</p>
<pre class="code">
first line
<mark type="arrow"/>
next line
</pre>

<p>
Arrow on blank last line - <i>shows in FF/Chrome/Safari but doesn't show in IE7. Use tab or &amp;nbsp;
to force blank lines to appear at end</i>
</p>
<pre class="code">
first line
<mark type="arrow"/>
</pre>

<p>
Arrow on last line with tab
</p>
<pre class="code">
first line
<mark type="arrow"/>	
</pre>

<p>
Group of arrow lines
</p>
<pre class="code" functions="funct2" variables="a">
unmarked line
<mark type="arrow"/>int funct2(int a) {
<mark type="arrow"/>	// a comment
<mark type="cross"/>	return a;
<mark type="arrow"/>}
unmarked
</pre>

<p>
Group of arrow lines at start
</p>
<pre class="code" functions="main printf funct2 funct3" variables="x a add">
<mark type="plus"/>int funct2(int a) {
<mark type="plus"/>	// a comment
<mark type="plus"/>	return a;
<mark type="plus"/>}
unmarked
</pre>

<p>
Group of arrow lines at end
</p>
<pre class="code" functions="main printf funct2 funct3" variables="x a add">
unmarked line
<mark type="arrow"/>int funct2(int a) {
<mark type="arrow"/>	// a comment
<mark type="star"/>	return a;
<mark type="arrow"/>}
</pre>

<p>
Disabled lines
</p>
<pre class="code">
enabled
<disabled/>int main(int argc, char **argv) {
	<disabled/>int x = 0;  /* x = 0 */
	<disabled/>// sample &lt;comment&gt;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
enabled
</pre>

<p>
Disabled lines at start
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>int x = 0;  /* x = 0 */
	<disabled/>// sample &lt;comment&gt;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
enabled
</pre>

<p>
Disabled lines at end
</p>
<pre class="code">
enabled
<disabled/>int main(int argc, char **argv) {
	<disabled/>int x = 0;  /* x = 0 */
	<disabled/>// sample &lt;comment&gt;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Marked and disabled
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>int x = 0;  /* x = 0 */
<mark type="cross"/>	<disabled/>// sample &lt;comment&gt;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Disabled blank line - <i>works in FF/Chrome/Safari but doesn't display properly in IE7.
Use tab (before) or &amp;nbsp; (after) to force blank lines to be displayed properly</i>
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>// next line is blank
<disabled/>
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Disabled blank line (tab before disable tag)
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>// next line is blank
	<disabled/>
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Disabled blank line (tab after disable tag) - <i>works in FF/Chrome/Safari but doesn't display properly in IE7.
Use &amp;nbsp; after disable tag to force blank lines to be displayed properly</i>
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>// next line is blank
<disabled/>	
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Disabled blank line (&amp;nbsp; after disable tag)
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>// next line is blank
<disabled/>&nbsp;
	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
Disabled blank line followed by marked line
</p>
<pre class="code">
<disabled/>int main(int argc, char **argv) {
	<disabled/>// next line is blank
	<disabled/>
<mark type="cross"/>	<disabled/>printf("sample output %d\n", x);
<disabled/>}
</pre>

<p>
All on 1 line
</p>
<pre class="code">int main(int argc, char **argv);</pre>

<p>
All on 1 line with mark
</p>
<pre class="code"><mark type="arrow"/>int main(int argc, char **argv);</pre>

<p>
All on 1 line disabled - <i>doesn't work, use newline at end before &lt;/pre&gt;</i>
</p>
<pre class="code"><disabled/>int main(int argc, char **argv);</pre>
</pre>

<p>
All on 1 line comment - <i>doesn't work, use newline at end before &lt;/pre&gt;</i>
</p>
<pre class="code">// int main(int argc, char **argv);</pre>
</pre>

<p>
All on 1 line inline comment
</p>
<pre class="code">/* int main(int argc, char **argv); */</pre>
</pre>

</body>
</html>
